using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace NoteManger
{
	public class TemplateForm : Form
	{
		public void SetWindowRegion()
		{
			System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
			System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 12, base.Width, base.Height - 12);
			path = this.GetRoundedRectPath(rect, 30);
			base.Region = new System.Drawing.Region(path);
		}
		private System.Drawing.Drawing2D.GraphicsPath GetRoundedRectPath(System.Drawing.Rectangle rect, int radius)
		{
			System.Drawing.Rectangle rect2 = new System.Drawing.Rectangle(rect.Location, new System.Drawing.Size(radius, radius));
			System.Drawing.Drawing2D.GraphicsPath graphicsPath = new System.Drawing.Drawing2D.GraphicsPath();
			graphicsPath.AddArc(rect2, 180f, 90f);
			rect2.X = rect.Right - radius;
			graphicsPath.AddArc(rect2, 270f, 90f);
			rect2.Y = rect.Bottom - radius;
			graphicsPath.AddArc(rect2, 0f, 90f);
			rect2.X = rect.Left;
			graphicsPath.AddArc(rect2, 90f, 90f);
			graphicsPath.CloseFigure();
			return graphicsPath;
		}
		protected override void OnResize(EventArgs e)
		{
			base.Region = null;
			this.SetWindowRegion();
		}
		private void InitializeComponent()
		{
            this.SuspendLayout();
            // 
            // TemplateForm
            // 
            this.ClientSize = new System.Drawing.Size(293, 97);
            this.Cursor = System.Windows.Forms.Cursors.Hand;
            this.Name = "TemplateForm";
            this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TemplateForm_MouseDown);
            this.ResumeLayout(false);

		}
		private void TemplateForm_MouseDown(object sender, MouseEventArgs e)
		{
		}
	}
}
